package com.ruoyi.web.ydz.service.impl;

import com.ruoyi.web.ydz.domain.DistrictBase;
import com.ruoyi.web.ydz.mapper.DistrictBaseMapper;
import com.ruoyi.web.ydz.service.IDistrictBaseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 地区Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-11
 */
@Service
public class DistrictBaseServiceImpl implements IDistrictBaseService
{
    @Resource
    private DistrictBaseMapper districtBaseMapper;

    /**
     * 查询地区
     * 
     * @param districtId 地区主键
     * @return 地区
     */
    @Override
    public DistrictBase selectDistrictBaseByDistrictId(String districtId)
    {
        return districtBaseMapper.selectDistrictBaseByDistrictId(districtId);
    }

    /**
     * 查询地区列表
     * 
     * @param districtBase 地区
     * @return 地区
     */
    @Override
    public List<DistrictBase> selectDistrictBaseList(DistrictBase districtBase)
    {
        return districtBaseMapper.selectDistrictBaseList(districtBase);
    }

    /**
     * 新增地区
     * 
     * @param districtBase 地区
     * @return 结果
     */
    @Override
    public int insertDistrictBase(DistrictBase districtBase)
    {
        return districtBaseMapper.insertDistrictBase(districtBase);
    }

    /**
     * 修改地区
     * 
     * @param districtBase 地区
     * @return 结果
     */
    @Override
    public int updateDistrictBase(DistrictBase districtBase)
    {
        return districtBaseMapper.updateDistrictBase(districtBase);
    }

    /**
     * 批量删除地区
     * 
     * @param districtIds 需要删除的地区主键
     * @return 结果
     */
    @Override
    public int deleteDistrictBaseByDistrictIds(String[] districtIds)
    {
        return districtBaseMapper.deleteDistrictBaseByDistrictIds(districtIds);
    }

    /**
     * 删除地区信息
     * 
     * @param districtId 地区主键
     * @return 结果
     */
    @Override
    public int deleteDistrictBaseByDistrictId(String districtId)
    {
        return districtBaseMapper.deleteDistrictBaseByDistrictId(districtId);
    }
}
